package com.wwj.my_ummary.goods.entity;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;

/**
 * <p>
 * 商品表
 * </p>
 *
 * @author wwj
 * @since 2021-01-14
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("goods")
@ApiModel(value="Goods对象", description="商品表")
public class Goods implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "商品id")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "商品名称")
    @TableField("name")
    private String name;

    @ApiModelProperty(value = "商品库存")
    @TableField("stock")
    private Integer stock;

    @ApiModelProperty(value = "并发版本控制")
    @TableField("version")
    @Version
    private Integer version;


    public static final String ID = "id";

    public static final String NAME = "name";

    public static final String STOCK = "stock";

    public static final String VERSION = "version";

}
